<?php

#[('__set', '无权类中没有权限的成员时')]
class User
{
    private $name = 'hflxhn';
    public function start()
    {
        echo "my name is hflxhn <br>";
    }

    public function __set($a, $b)
    {
        echo "您无权设置{$a}的值为{$b}";
    }
}

$obj       = new User();
$obj->name = 22;
